/*
 * Hospede.java
 *
 * Created on October 12, 2007, 10:45 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package petstore.model;

import java.util.Collection;
import javax.persistence.AttributeOverride;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Entity class Hospede
 * 
 * @author Tom Hayden
 */
@Entity
@Table(name = "hospede")
@AttributeOverride(name="id", column=@Column(name="cdhospede", nullable = false))
public class Hospede extends BusinessObject {

    @Column(name = "vlrdiaria")
    private Double valorDiaria;

    @ManyToOne
    @JoinColumn(name="cdanimal")
    private Animal animal;

    @ManyToOne
    @JoinColumn(name="cddiariahosp")
    private DiariaHospedagem diariaHospedagem;

    @OneToMany(cascade = CascadeType.ALL)
    private Collection<Pertence> pertences;

    @OneToMany(cascade = CascadeType.ALL)
    private Collection<Recomendacao> recomendacoes;
    
    /** Creates a new instance of Hospede */
    public Hospede() {
    }

    public Double getValorDiaria() {
        return valorDiaria;
    }

    public void setValorDiaria(Double valorDiaria) {
        this.valorDiaria = valorDiaria;
    }

    public Animal getAnimal() {
        return animal;
    }

    public void setAnimal(Animal animal) {
        this.animal = animal;
    }

    public DiariaHospedagem getDiariaHospedagem() {
        return diariaHospedagem;
    }

    public void setDiariaHospedagem(DiariaHospedagem diariaHospedagem) {
        this.diariaHospedagem = diariaHospedagem;
    }

    public Collection<Pertence> getPertences() {
        return pertences;
    }

    public void setPertences(Collection<Pertence> pertences) {
        this.pertences = pertences;
    }

    public Collection<Recomendacao> getRecomendacoes() {
        return recomendacoes;
    }

    public void setRecomendacoes(Collection<Recomendacao> recomendacoes) {
        this.recomendacoes = recomendacoes;
    }
    
}
